<template>
  <div id="app">
    <el-button
      class="go-back"
      type="primary"
      v-show="$route.path !== '/'"
      @click="$router.go(-1)"
      >返回</el-button
    >
    <img class="img" src="./assets/logo.png" />
    <router-view />
  </div>
</template>

<script>
import "@/assets/css/common.css"; //引入公共css

export default {
  name: "App",
  watch: {
    $route(val) {
      console.log(val);
    },
  },
};
</script>

<style lang="less">
@keyframes img-rorate {
  0% {
    transform: rotateZ(-90deg);
  }
  100% {
    transform: rotateZ(90deg);
  }
}
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
  position: relative;
  .img {
    width: 70px;
    animation: img-rorate 10s linear infinite alternate;
  }
  .go-back {
    position: absolute;
    right: 200px;
  }
}
</style>
